﻿using System.ComponentModel.DataAnnotations;

namespace my_webapi_demo.Db.Entity
{
    public class DbEntity
    {
        private Guid? _id;

        [Key]
        public Guid Id
        {
            get => _id ??= Guid.NewGuid();
            set => _id = value;
        }

        /// <summary>
        /// 是否删除 （标记删除）
        /// </summary>
        public bool IsDelete { get; set; }
    }
}
